package cn.domypay.back.base;

import java.util.List;

import cn.domypay.back.exception.DoMyPayException;

public interface BaseDao {

	/**
	 * Get list info by sqlMap
	 * @param obj
	 * @param sqlMapID
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public List getList(BaseObj obj,String sqlMapID) throws DoMyPayException;
	/**
	 * Get list by parameter
	 * @param parameter
	 * @param sqlMapID
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public List getList(String parameter,String sqlMapID) throws DoMyPayException;
	
	/**
	 * Get list by sqlMapId
	 * @param obj
	 * @param sqlMapId
	 * @param searchVO
	 * @return
	 * @throws NetosException
	 */
	//public List getList(BaseObj obj,String sqlMapId, SearchVO searchVO);
	

	/**
	 * add by sqlMapId
	 * @param obj
	 * @param sqlMapId
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public String add(BaseObj obj,String sqlMapId) throws DoMyPayException;
	
	/**
	 * Modify by sqlMapId
	 * @param obj
	 * @param sqlMapId
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public void modify(BaseObj obj,String sqlMapId) throws DoMyPayException;
	/**
	 * Modify by sqlMapId
	 * @param parameter
	 * @param sqlMapId
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public void modify(String parameter,String sqlMapId) throws DoMyPayException;
	
	/**
	 * Delete by sqlMap Id
	 * @param obj
	 * @param sqlMapId
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public void delete(BaseObj obj,String sqlMapId) throws DoMyPayException;
	/**
	 * Delete by sqlMapID
	 * @param parameter
	 * @param sqlMapId
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	
	public void delete(String parameter,String sqlMapId) throws DoMyPayException;
	

	/**
	 * Get object by sqlMap
	 * @param obj PObject
	 * @param sqlMapId ibatis sqlmap Id
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public BaseObj getObject(BaseObj obj,String sqlMapId) throws DoMyPayException;
	/**
	 * Get object by sqlMap
	 * @param Id  recordId
	 * @param sqlMapID ibatis sqlmap Id
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public BaseObj getObject(String parameter,String sqlMapID) throws DoMyPayException;
	/**
	 * Get count by sqlMap and obj
	 * @param Id  recordId
	 * @param sqlMapID ibatis sqlmap Id
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public String getCount(BaseObj object,String sqlMapId) throws DoMyPayException;
	/**
	 * Get List by sqlMap
	 * @param Id  recordId
	 * @param sqlMapID ibatis sqlmap Id
	 * @return
	 * @throws DoMyPayException 
	 * @throws NetosException
	 */
	public List<BaseObj> getList(String sqlMapID) throws DoMyPayException;
	/**
	 * 获取前N条数据集合
	 */
	public List<BaseObj> getTopList(BaseObj obj, String sqlMapId,int start, int end) throws DoMyPayException;
}
